<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> 
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<link rel="stylesheet" href="/GestionInscription/css/bootstrap/css/bootstrap.css" type="text/css" />
<link rel="stylesheet" href="/GestionInscription/css/style.css" type="text/css" />
<title>Edition compte</title>
</head>
<body>
	<div class="contenu">
		<a href="/GestionInscription">Retour acceuil</a>
		<fieldset>
			<legend><h3>Editier vos information</h3></legend>
			<c:if test="${message != null}">
				<p class="text-info"><c:out value="${message}" /></p>
			</c:if>
			<form action="/GestionInscription/edit" method="post">
				<label>Account type :</label>
				<select name="type" disabled="disabled">
					<c:choose>
						<c:when test="${sessionScope.user.type == 'PRIVATE'}">
							<option value="PRIVATE" selected="selected">Private</option> 
						</c:when>
						<c:otherwise>
							<option value="PRIVATE" >Private</option> 
						</c:otherwise>
					</c:choose>
							
					<c:choose>
						<c:when test="${sessionScope.user.type == 'PROFESSIONAL'}">
							<option value="PROFESSIONAL" selected="selected">Professional</option> 
						</c:when>
						<c:otherwise>
							<option value="PROFESSIONAL" >Professional</option> 
						</c:otherwise>
					</c:choose>
					
					<c:choose>
						<c:when test="${sessionScope.user.type == 'SUPPLIER'}">
							<option value="SUPPLIER" selected="selected">Supplier</option> 
						</c:when>
						<c:otherwise>
							<option value="SUPPLIER" >Supplier</option> 
						</c:otherwise>
					</c:choose>
				</select><br>
				<label>Email :</label><input type="email" name="email" required="required" disabled="disabled" value="<c:out value='${sessionScope.user.email}'/>" /><br>
				<label>Password :</label><input type="password" name="password" required="required" value="<c:out value='${sessionScope.user.password}'/>" /><br>
				<label>First name :</label><input type="text" name="firstName" required="required" value="<c:out value='${sessionScope.user.firstName}'/>"/><br>
				<label>Last name :</label><input type="text" name="lastName" required="required" value="<c:out value='${sessionScope.user.lastName}'/>" /><br>
				<label>Phone :</label><input type="text" name="phone" required="required" value="<c:out value='${sessionScope.user.phone}'/>"/><br>
				<label>Address :</label><input type="text" name="address" required="required" value="<c:out value='${sessionScope.user.address}'/>"/><br>
				<input type="submit" value="Changer Information" class="btn btn-primary" />
			</form>
		</fieldset>
	</div>
</body>
</html>